/* Copyright (c) [2025] [zhi1208@126.com]
 * SPDX-License-Identifier: MIT
 */

/*********************
 *      INCLUDES
 *********************/
#include "hmi_pg_manager.h"
#include "hmi_pg_navigation.h"
#include "hmi_subject.h"
#include "hmi_ctrl_center.h"
#include "hmi_status_bar.h"
#include "hmi_pages.h"
#include "hmi_asset.h"

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 *  STATIC PROTOTYPES
 **********************/
static void system_init();
static void components_init();

/**********************
 *  STATIC VARIABLES
 **********************/

/**********************
 *      MACROS
 **********************/

/**********************
 *   GLOBAL FUNCTIONS
 **********************/
void hmi()
{
    hmi_tiny_ttf_font_manager_init();
    hmi_subject_init();
    system_init();
    components_init();

    hmi_pg_push(hmi_pg_home());

    // #if (LV_USE_MONKEY)
    //     lv_monkey_config_t config;
    //     lv_monkey_config_init(&config);
    //     config.type = LV_INDEV_TYPE_POINTER;
    //     config.period_range.min = 10;
    //     config.period_range.max = 100;
    //     lv_monkey_t *monkey = lv_monkey_create(&config);

    //     lv_monkey_set_enable(monkey, true);
    // #endif
}

/**********************
 *   STATIC FUNCTIONS
 **********************/
static void system_init()
{
    hmi_pg_manager_init();
    hmi_pg_navigation_init();
}

static void components_init()
{
    hmi_ctrl_center_init();
    hmi_status_bar_init();
}
